/// @tags: Binom Math
#include <algorithm>
#include <cctype>
#include <cstdio>

typedef long long ll;

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

const int N = 2e5 + 5, mod = 1e9 + 7;

int f[N], inv[N], t, n, m, k;

inline int qpow(ll base, int exp) {
  ll res = 1;
  while (exp) {
    if (exp & 1) res = base * res % mod;
    base = base * base % mod;
    exp >>= 1;
  }
  return res;
}

inline int C(int m, int n) {
  return 1ll * f[n] * inv[m] % mod * inv[n - m] % mod;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen64("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen64("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("matrix.in", "r", stdin);
  freopen("matrix.out", "w", stdout);
#endif
#endif

  read(t);
  inv[0] = f[0] = 1;
  for (int i = 1; i < N; i++)
    f[i] = 1ll * i * f[i - 1] % mod, inv[i] = qpow(f[i], mod - 2);
  while (t--) {
    read(n), read(m), read(k);
    int nn = std::min(n, k), mm = std::min(m, k), an = 0, am = 0, bn = 0,
        bm = 0;
    for (int i = nn & 1; i <= nn; i += 2) an = (an + C(i, n)) % mod;
    for (int i = mm & 1; i <= mm; i += 2) am = (am + C(i, m)) % mod;
    if ((n & 1) == 0 && (m & 1) == 0) {
      int l = std::max(n - k, 0), r = std::min(n, k);
      for (int i = l; i <= r; i += 2) bn = (bn + C(i, n)) % mod;
      l = std::max(m - k, 0), r = std::min(m, k);
      for (int i = l; i <= r; i += 2) bm = (bm + C(i, m)) % mod;
    }
    printf(
        "%lld\n",
        (1ll * an * am % mod - 1ll * bn * inv[2] % mod * bm % mod + mod) % mod);
  }
  return 0;
}